package com.example.sunsg.okhttptest.bean;

import org.litepal.crud.DataSupport;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by sunsg on 16/2/18.
 */
public class News extends DataSupport{
    private int id;
    private String title;
    private String subTitle;
    private String content;

    private Introduction introduction;

    private List<Comment> commentList = new ArrayList<>();

    private List<Category> categories;

    public List<Category> getCategories() {
        return categories;
    }

    public void setCategories(List<Category> categories) {
        this.categories = categories;
    }

    public List<Comment> getCommentList() {
        return DataSupport.where("news_id = ?",String.valueOf(id)).find(Comment.class);
    }

    public void setCommentList(List<Comment> commentList) {
        this.commentList = commentList;
    }

    public Introduction getIntroduction() {
        return introduction;
    }

    public void setIntroduction(Introduction introduction) {
        this.introduction = introduction;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
